<html>
<head><meta charset="utf-8"><title>unused parameters in `quote::parse` · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/unused.20parameters.20in.20.60quote.3A.3Aparse.60.html">unused parameters in `quote::parse`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176367890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/unused%20parameters%20in%20%60quote%3A%3Aparse%60/near/176367890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/unused.20parameters.20in.20.60quote.3A.3Aparse.60.html#176367890">(Sep 23 2019 at 13:26)</a>:</h4>
<p>I've noticed that <a href="https://github.com/rust-lang/rust/blob/66bf391c3aabfc77f5f7139fc9e6944f995d574e/src/libsyntax/ext/tt/quoted.rs#L205" target="_blank" title="https://github.com/rust-lang/rust/blob/66bf391c3aabfc77f5f7139fc9e6944f995d574e/src/libsyntax/ext/tt/quoted.rs#L205"><code>quote::parse</code></a> has a bunch of unused params: macro_node_id, features, attrs. They are not mark as used, b/c the function is recursive. They were used previously to implement <code>?</code> (which wasn't available on 2015), but are unused now.</p>
<p>Should we remove them, or should we keep them for future use? cc <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> </p>
<p>I the <code>macro_node_id</code> is especially eyebrow raising one for me, as it seems like macro parsing should be independent of a particular node id?</p>



<a name="176485187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/unused%20parameters%20in%20%60quote%3A%3Aparse%60/near/176485187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/unused.20parameters.20in.20.60quote.3A.3Aparse.60.html#176485187">(Sep 24 2019 at 17:17)</a>:</h4>
<blockquote>
<p>macro_node_id is especially eyebrow raising</p>
</blockquote>
<p>Perhaps it was used for lint reporting or something.</p>



<a name="176485240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/unused%20parameters%20in%20%60quote%3A%3Aparse%60/near/176485240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/unused.20parameters.20in.20.60quote.3A.3Aparse.60.html#176485240">(Sep 24 2019 at 17:18)</a>:</h4>
<p>I'm pretty sure they can be removed, yeah.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>